package com.magiccompass.alipay.barcode.entity;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.DynamicUpdate;

@Entity
@Table(name = "TD_ALIPAY_QRCODE_TRANSACTION")
@DynamicUpdate(value= true)
public class AlipayQRCodeTransaction {
	@Id
	@Column(name = "ID")
	@GeneratedValue
	private Integer id;
	
	@ManyToOne(cascade=CascadeType.REFRESH)
	@JoinColumn(name="mt_id", nullable=false)
	private MerchantTransaction mt;
	
	@ManyToOne(cascade=CascadeType.REFRESH)
	@JoinColumn(name="notification_id", nullable=false)
	private AlipayQRCodeNotification qrCodeNotification;

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public MerchantTransaction getMt() {
		return mt;
	}

	public void setMt(MerchantTransaction mt) {
		this.mt = mt;
	}

	public AlipayQRCodeNotification getQrCodeNotification() {
		return qrCodeNotification;
	}

	public void setQrCodeNotification(AlipayQRCodeNotification qrCodeNotification) {
		this.qrCodeNotification = qrCodeNotification;
	}
}